package day03;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
public class Demo08 {

	public static void main(String[] args) {

		GregorianCalendar c1=new GregorianCalendar();
		Calendar c2=Calendar.getInstance();
		System.out.println(c1);
		System.out.println(c2);
		
		
		SimpleDateFormat sdf=new SimpleDateFormat();
		Date date=c1.getTime();
		String s=sdf.format(date);
		System.out.println(s);
		
		date=c2.getTime();
		System.out.println(date);
		s=sdf.format(date);
		System.out.println(s);
		
		
	}

}
